import { operationLogAPI } from '@/api/operationLog'

export const tracking = async (
  module: string,
  operation_person: string,
  operation_object: string,
  operation_level: string,
  operation: string
) => {
  let operation_content: string = ''
  // 操作内容
  if (module !== '') {
    operation_content = `对 ${module} "${operation_object}" 进行了 "${operation}" 操作`
  } else {
    operation_content = `对 "${operation_object}" 进行了 "${operation}" 操作`
  }
  await operationLogAPI(operation_person, operation_content, operation_level)
}
